//
//  LWLabel.m
//  练习项目
//
//  Created by 吴丹草 on 17/1/4.
//  Copyright © 2017年 吴丹草. All rights reserved.
//

#import "LWLabel.h"

@implementation LWLabel

+ (instancetype)addLabelWithTitle : (NSString *)title
{
    LWLabel *label = [LWLabel new];
    label.text = title;
     label.font = [UIFont systemFontOfSize:18];
    [label sizeToFit];
    label.font = [UIFont systemFontOfSize:14];
    label.textAlignment = NSTextAlignmentCenter;
    
    return label;
}

//- (instancetype)initWithFrame:(CGRect)frame
//{
//    if(self = [super initWithFrame:frame])
//    {
////        [self setupUI];
//    }
//    
//    return self;
//}
//
//- (void)setupUI
//{
//    [self sizeToFit];
//    self.font = [UIFont systemFontOfSize:14];
//    self.textAlignment = NSTextAlignmentCenter;
//}

- (void)setIsSelect:(BOOL)isSelect
{
    _isSelect = isSelect;
    
    if(_isSelect)
    {
        self.font = [UIFont systemFontOfSize:18];
        self.textColor = [UIColor redColor];
    }
    else
    {
        self.font = [UIFont systemFontOfSize:14];
        self.textColor = [UIColor blackColor];
    }
}


@end
